#include "stdio.h"
#include "stdlib.h"
typedef struct A{
    int data;
}A;
typedef struct B{
    int data;
    A  * a;
}B;

int main(){
    B * b = (B*)malloc(sizeof(B));
    A * aInB= (A*)malloc(sizeof(A));
    aInB->data = 114;
    b->a = aInB;
    b->data = 514;

    A * a = b->a;

    printf("%d\n", a->data);
    printf("%d\n", b->a->data);

    free(b);

    printf("%d\n", a->data);
    printf("%d\n", b->a->data);//不能用
    printf("%d\n", b->data);//不能用
    return 0;
}